package com.hz.service.impl;

import com.hz.dao.OrderDao;
import com.hz.pojo.Order;
import com.hz.service.OrderService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {

    @Resource
    private OrderDao orderDao;

    @Override
    public Order getOrderById(String order_code) throws Exception {
        return orderDao.getOrderById(order_code);
    }

    @Override
    public List<Order> getOrderListByUserId(Long user_id) throws Exception {
        return orderDao.getOrderListByUserId(user_id);
    }

    @Override
    public int addOrder(Order order) throws Exception {
        return orderDao.addOrder(order);
    }

    @Override
    public int updOrder(String order_code, long order_state, String wash_end_time) throws Exception {
        return orderDao.updOrder(order_code,order_state,wash_end_time);
    }

}